Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(output_panel): recreate window and term channel if panel closed #475

Closed
wants to merge 2 commits into from

Conversation

YaroSpace
Copy link

@YaroSpace YaroSpace commented Nov 25, 2024

A fix for 2 issues that appear if output_panel is closed by the user manually and not with output_pannel.toggle/close():

  1. The buffer id for output panel becomes invalid, so there is an error when trying to open the panel again. Currently the check with vim.fn.bufexists() does not catch buffers that exist, but are unloaded. Fix - recreate the buffer.
  2. The channel id for term bound to panel buffer becomes invalid, so there is an error when trying to write to that channel. Fix - recreate the term.

Also, a fix with associated issue: if you reaload the plugin with say Lazy reload neotest, the old panel buffer still exists, so when a new buffer is created with the same name, there is an error of trying to rename existing buffer. Fix - delete buffer with the same name, when ceating a new one.

@YaroSpace YaroSpace force-pushed the master branch 2 times, most recently from 7b4db8a to 7a4afa1 Compare November 25, 2024 12:42
@YaroSpace YaroSpace closed this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant